package com.bdqn;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;

public class Sldm3 {
    public static void main(String[] args) throws ParserConfigurationException, IOException, SAXException {
        DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
        DocumentBuilder db=dbf.newDocumentBuilder();
        Document doc=  db.parse("src/com/bdqn/Sldm2.xml");
        NodeList list= doc.getElementsByTagName("pudDate");
        Element pudDateElement=(Element) list.item(0);
        String pudDate=pudDateElement.getFirstChild().getNodeValue();
        System.out.println(pudDate);
    }
}
